Klein Bottle
By Mariam Al-Hawaj

Speak["This program by Mariam Al-Hawaj draws pictures of a Klein Bottle"]

ParametricPlot3D

Speak["Here, we draw the klein bottle using ParametricPlot3D which includes the function values for each of x, y, and z coordinates."]

a=3;
ParametricPlot3D[{Cos[x] (a+Cos[x/2] Sin[y]-Sin[x/2] Sin[2 y]),Sin[x] (a+Cos[x/2] Sin[y]-Sin[x/2] Sin[2 y]),Sin[x/2] Sin[y]+Cos[x/2] Sin[2 y]},{x,-Pi,Pi},{y,0,2 Pi},Boxed->False,Axes->None,PlotPoints->100,MaxRecursion->5,Mesh->None,NormalsFunction->None]//Timing

Initialization

Speak["To make it go faster, we made a list of values of x, y, and z and gave it the name klein. Then we used it in the ParametricPlot3D to draw the klein bottle. It definitely went faster."]

c=3;
klein={Cos[u] (c+Cos[u/2] Sin[v]-Sin[u/2] Sin[2 v]),Sin[u] (c+Cos[u/2] Sin[v]-Sin[u/2] Sin[2 v]),Sin[u/2] Sin[v]+Cos[u/2] Sin[2 v]};
thePlot=ParametricPlot3D[klein,{u,-Pi,Pi},{v,0,2 Pi},Axes->None,Boxed->False,PlotPoints->10,MaxRecursion->5,Mesh->None,NormalsFunction->None]//Timing

Manipulation

Speak["Here, we used manipulate to show the klein bottle with different radii."]

a=1;
Manipulate[ParametricPlot3D[{Cos[u] (a+Cos[u/2] Sin[v]-Sin[u/2] Sin[2 v]),Sin[u] (a+Cos[u/2] Sin[v]-Sin[u/2] Sin[2 v]),Sin[u/2] Sin[v]+Cos[u/2] Sin[2 v]},{u,-Pi,Pi},{v,0,2 Pi},Axes->None,Boxed->False,PlotPoints->10,MaxRecursion->5,Mesh->None,NormalsFunction->None],{a,-2,2}]

Animation

Speak["We also tried to animate a small ball to slide on the klein bottle, and it didn't work as required. However, Mariam will continue to put sometime on this in the coming days to achieve the expected outcome."]

b=3;
ParametricPlot3D[{Cos[u] (b+Cos[u/2] Sin[v]-Sin[u/2] Sin[2 v]),Sin[u] (b+Cos[u/2] Sin[v]-Sin[u/2] Sin[2 v]),Sin[u/2] Sin[v]+Cos[u/2] Sin[2 v]},{u,-Pi,Pi},{v,0,2 Pi},Axes->None,Boxed->False,PlotPoints->10,MaxRecursion->5,Mesh->None,NormalsFunction->None]
Animate[ParametricPlot3D[{Cos[u] (b+Cos[u/2] Sin[v]-Sin[u/2] Sin[2 v]),Sin[u] (b+Cos[u/2] Sin[v]-Sin[u/2] Sin[2 v]),Sin[u/2] Sin[v]+Cos[u/2] Sin[2 v]},{u,-Pi,Pi},{v,0,2 Pi},Axes->None,Boxed->False,PlotPoints->10,MaxRecursion->5,Mesh->None,NormalsFunction->None]
Graphics3D[Point[{{Cos[u] (b+Cos[u/2] Sin[v]-Sin[u/2] Sin[2 v]),Sin[u] (b+Cos[u/2] Sin[v]-Sin[u/2] Sin[2 v]),Sin[u/2] Sin[v]+Cos[u/2] Sin[2 v]}}],Boxed->False],{u,-2Pi,2Pi},{v,0,4Pi}]

Traditional Picture of the Klein Bottle

Speak["Here, we used more complicated parameterization of the 3-dimensional immersion of the bottle to obtain the traditional picture. However, the picture doesn't show."]

x[u_,v_]=-(2/15)Cos[u] (3Cos[v]-30Sin[u]+90(Cos^4)[u]Sin[u]-60(Cos^6)[u]Sin[u]+5Cos[u]Cos[v]Sin[u]);
y[u_,v_]=-(1/15)Sin[u] (3Cos[v]-3(Cos^2)[u]Cos[v]-48(Cos^4)[u]Cos[v]+48(Cos^6)[u]Cos[v]-60Sin[u]+5Cos[u]Cos[v]Sin[u]-5(Cos^3)[u]Cos[v]Sin[u]-80(Cos^5)[u]Cos[v]Sin[u]+80(Cos^7)[u]Cos[v]Sin[u]);
z[u_,v_]=(2/15)(3+5Cos[u] Sin[u])Sin[ v];
ParametricPlot3D[{x[u,v],y[u,v],z[u,v]},{u,0,Pi},{v,0,2 Pi},Axes->None,Boxed->False,PlotPoints->10,MaxRecursion->5,Mesh->None,NormalsFunction->None]

Another Try

Speak["Finally, we tried to include the functions within the ParametricPlot3D, but still not successful. I guess, more time needed for this to be completed by Mariam. Thank you for your time!"]

u=0;
v=0;
ParametricPlot3D[{-(2/15)*Cos[u] (3Cos[v]-30Sin[u]+90(Cos^4)[u]Sin[u]-60(Cos^6)[u]Sin[u]+5Cos[u]Cos[v]Sin[u]),-(1/15)*Sin[u] (3Cos[v]-3(Cos^2)[u]Cos[v]-48(Cos^4)[u]Cos[v]+48(Cos^6)[u]Cos[v]-60Sin[u]+5Cos[u]Cos[v]Sin[u]-5(Cos^3)[u]Cos[v]Sin[u]-80(Cos^5)[u]Cos[v]Sin[u]+80(Cos^7)[u]Cos[v]Sin[u]),(2/15)*(3+5Cos[u] Sin[u])Sin[ v]},{u,0,Pi},{v,0,2 Pi},Axes->None,Boxed->False,PlotPoints->10,MaxRecursion->5,Mesh->None,NormalsFunction->None]